package com.dhcc.DRGsHosp.core.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import java.io.Serializable;
import org.openkoala.koala.commons.domain.KoalaLegacyEntity;

/**
 * @ClassName: ScheduleJob  
 * @Description ：定时任务类    
 * @Date: 2018年10月10日 上午11:39:57  
 * @Author QiaoYiLong 
 * @Version 3.1.1 DHC-DRG
 */
@Entity
@Table(name="T_TIMETASK", schema = "DRGs")
public class ScheduleJob extends KoalaLegacyEntity {

	private static final long serialVersionUID = 8051068653220327894L;
	
	public static final String STATUS_RUNNING = "1";  // 任务已发布，可以运行
	 
	public static final String STATUS_NOT_RUNNING = "0"; // 任务已停止，不可以运行
	
	public ScheduleJob(){
		super();
	}
	public ScheduleJob(String jobId, String jobName, String jobGroup, String jobStatus, String cronExpression,
			String description, String beanClass, String planStatus, String methodName, String jobData,
			String createUser, Date updateTime, Date createTime,String jobExecuteTime) {
		super();
		this.jobId = jobId;
		this.jobName = jobName;
		this.jobGroup = jobGroup;
		this.jobStatus = jobStatus;
		this.cronExpression = cronExpression;
		this.description = description;
		this.beanClass = beanClass;
		this.planStatus = planStatus;
		this.methodName = methodName;
		this.jobData = jobData;
		this.createUser = createUser;
		this.updateTime = updateTime;
		this.createTime = createTime;
		this.jobExecuteTime=jobExecuteTime;
	}
	
	//主键
	@Id
	@Column(name = "ID",nullable=false)	 
	private String jobId;
	 		
  /**
   * 任务名称
   */
	@Column(name = "JOB_NAME")
	private String jobName;
 
 
  /**
   * 任务分组名称
   */
	@Column(name = "JOB_GROUP_NAME")
	private String jobGroup;
 
  /**
   * 任务执行时间cron表达式
   */
	@Column(name = "CRON")
	private String cronExpression;
		
  /**
   * 任务状态 是否启动任务
   */
	@Column(name = "JOB_STATUS")
	private String jobStatus;
	
  /**
   * 任务是否有状态
   */
	@Column(name = "PLAN_STATUS")
	private String planStatus; 
	
	/**
	 * 向任务调用的方法传递的参数
	 */
	@Column(name = "JOB_DATA")
	private String jobData; 

   /**
   * 任务调用的方法名
   */
	@Column(name = "METHOD_NAME")
	private String methodName; 
 
  /**
   * 任务执行时调用哪个类的方法 包名+类名
   */
	@Column(name = "BEAN_NAME")
	private String beanClass;
	
  /**
   * 描述
   */
	@Column(name = "DESCRIPTION")
	private String description;

   /**
   * 创建人
   */
	@Column(name = "CREATE_USER")
	private String createUser; 

  /**
   * 创建时间
   */
	@Column(name = "CREATE_DATE")
	private Date createTime;
 
  /**
   * 修改时间
   */
	@Column(name = "MODIFY_DATE")
	private Date updateTime;
 
	 /**
	   * cron转译
	   */
	@Column(name = "JOB_EXECUTE_TIME")
	private String jobExecuteTime;

	
	public String getJobExecuteTime() {
	return jobExecuteTime;
	}
	public void setJobExecuteTime(String jobExecuteTime) {
		this.jobExecuteTime = jobExecuteTime;
	}
	public String getJobId() {
		return jobId;
	}
		
	public void setJobId(String jobId) {
		this.jobId = jobId;
	}
	public String getJobName() {
		return jobName;
	}
	public void setJobName(String jobName) {
		this.jobName = jobName;
	}
	public String getJobGroup() {
		return jobGroup;
	}
	public void setJobGroup(String jobGroup) {
		this.jobGroup = jobGroup;
	}
	public String getJobStatus() {
		return jobStatus;
	}
	public void setJobStatus(String jobStatus) {
		this.jobStatus = jobStatus;
	}
	public String getCronExpression() {
		return cronExpression;
	}
	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getBeanClass() {
		return beanClass;
	}
	public void setBeanClass(String beanClass) {
		this.beanClass = beanClass;
	}
	public String getPlanStatus() {
		return planStatus;
	}
	public void setPlanStatus(String planStatus) {
		this.planStatus = planStatus;
	}
	public String getMethodName() {
		return methodName;
	}
	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}
	public String getJobData() {
		return jobData;
	}
	public void setJobData(String jobData) {
		this.jobData = jobData;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getCreateUser() {
		return createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	@Override
	public Serializable getId() {
		return jobId;
	}
	
	
	@Override
	public String[] businessKeys() {
		return null;
	}
 
 
}

